package com.wang;

import lombok.Data;

/**
 * @ProjectName: untitled
 * @Titile: sTUDENT
 * @Author: 王亦凡1
 * @Description: TODO
 */
@Data
public class Student implements Comparable<Student> {
    public Student(String name, int age) {
    }

    public int getAge() {
        return age;
    }

    public String getName() {
        return name;
    }

    private String name;
       private int age;

    @Override
    public int compareTo(Student o) {
        //按照学生正序排序
        return this.age-o.getAge();
    }
}
